<script setup lang="ts">
//
import { ref, reactive } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { apiGradeList } from '@/apis/user';


let infoId = ref('')
let infoText = ref('')
// let memberEquity = ref([
//   {
//     title: 'VIP1会员权益一',
//     text: '您可在乐石平台上架和购买商品',
//   },
//   {
//     title: 'VIP1会员权益一',
//     text: '您可在乐石平台上架和购买商品',
//   },
// ])

const getFGradeList = async () => {
  let res = await apiGradeList();
  if(res.data&&res.data.length>0) {
    res.data.forEach((item:any) => {
      if(item.id==infoId.value) {
        infoText.value = item.content
      }
    })
  }
}

onLoad((option:any) => {
  infoId.value = option.id??''
  getFGradeList();
})
</script>

<template>
  <view class="card-list">
    <!-- <view class="row-box card-box" v-for="(item, index) in memberEquity" :key="index">
      <view class="title-box">{{ item.title }}:</view>
      <view class="text-box">{{ item.text }}</view>
    </view> -->
    <rich-text :nodes="infoText"></rich-text>
  </view>
</template>

<style lang="scss" scoped>
//
.card-list {
  padding: 20rpx 30rpx;
}

.card-box {
  margin-top: 30rpx;
  color: rgba(16, 16, 16, 1);

  .title-box {
    padding: 0 40rpx 27rpx;
    border-bottom: 2rpx solid rgba(239, 239, 239, 1);
    font-size: 32rpx;
  }

  .text-box {
    padding: 30rpx 40rpx 0;
    font-size: 28rpx;
  }
}
</style>
